﻿package com.map 
{
	import flash.geom.Point;
	import com.staticInfo.MapData;
	
	/**
	 * ...
	 * @author zhengzihua
	 */
	public class Sign 
	{
		//编号
		private var _ix:int;
		private var _iy:int;
		private var _ng:int;
		private var nh:int;
		private var nf:int;
		private var _f:int;
		private var _p:Sign;//父标记
		//坐标
		private var cx:int;
		private var cy:int;
		public function Sign(sp:Point,ng:int,nh:int,p:Sign) 
		{
			this._ix = sp.x;
			this._iy = sp.y;
			this._ng = ng;
			this.nh = nh;
			this._p = p;
			this._f = _ng + nh;
			
		}
		public function getSign():Object {
			//返回该节点的坐标
			cx = (_ix + iy) * MapData.basePix;
			cy = (_ix - _iy) * MapData.basePix*0.5;
			
			return { cx:cx, cy:cy, sx:_ix, sy:_iy };
		}
		public function get ix():int { return _ix; }
		
		public function get iy():int { return _iy; }
		
		public function get ng():int { return _ng; }
		
		public function get f():int { return _f; }
		
		public function get p():Sign { return _p; }
		
	}
	
}